# eric7.VirtualEnv.VirtualenvConfigurationDialog

Module implementing a dialog to enter the parameters for the virtual environment.

### Global Attributes

None

### Classes

VirtualenvConfigurationDialog | Class implementing a dialog to enter the parameters for the virtual environment.

### Functions

None

## VirtualenvConfigurationDialog

Class implementing a dialog to enter the parameters for the virtual environment.

### Derived from

QDialog, Ui_VirtualenvConfigurationDialog

### Class Attributes

None

### Class Methods

None

### Methods

VirtualenvConfigurationDialog | Constructor
__generateArguments | Private method to generate the process arguments.
__generateTargetDir | Private method to generate a valid target directory path.
__setPyvenvVersion | Private method to determine the pyvenv version and set the respective label.
__setVirtualenvVersion | Private method to determine the virtualenv version and set the respective label.
__updateOK | Private slot to update the enabled status of the OK button.
__updateUi | Private slot to update the UI depending on the selected virtual environment creator (virtualenv or pyvenv).
getData | Public method to retrieve the dialog data.
on_pythonExecPicker_textChanged | Private slot to react to a change of the Python executable.

### Static Methods

None

#### VirtualenvConfigurationDialog (Constructor)

VirtualenvConfigurationDialog(baseDir="", parent=None)

Constructor

baseDir (str)
  base directory for the virtual environments
parent (QWidget)
  reference to the parent widget

#### VirtualenvConfigurationDialog.__generateArguments

__generateArguments()

Private method to generate the process arguments.

Return:
  process arguments

Return Type:
  list of str

#### VirtualenvConfigurationDialog.__generateTargetDir

__generateTargetDir()

Private method to generate a valid target directory path.

Return:
  target directory path

Return Type:
  str

#### VirtualenvConfigurationDialog.__setPyvenvVersion

__setPyvenvVersion()

Private method to determine the pyvenv version and set the respective label.

#### VirtualenvConfigurationDialog.__setVirtualenvVersion

__setVirtualenvVersion()

Private method to determine the virtualenv version and set the respective label.

#### VirtualenvConfigurationDialog.__updateOK

__updateOK()

Private slot to update the enabled status of the OK button.

#### VirtualenvConfigurationDialog.__updateUi

__updateUi()

Private slot to update the UI depending on the selected virtual environment creator (virtualenv or pyvenv).

#### VirtualenvConfigurationDialog.getData

getData()

Public method to retrieve the dialog data.

Return:
  dictionary containing the data for the new environment. The keys are 'arguments' containing the command line arguments, 'logicalName' containing the environment name to be used with the virtual environment manager and 'envType' containing the environment type (virtualenv or pyvenv). Additional keys are 'openTarget' containg a flag to open the target directory after creation, 'createLog' containing a flag to write a log file, 'createScript' containing a flag to write a script, 'targetDirectory' containing the target directory and 'pythonExe' containing the Python interpreter to be used.

Return Type:
  dict

#### VirtualenvConfigurationDialog.on_pythonExecPicker_textChanged

on_pythonExecPicker_textChanged(_txt)

Private slot to react to a change of the Python executable.

_txt (str)
  contents of the picker's line edit (unused)

Up